<p>Inheritance is certainly one of the most valuable concepts in object-oriented programming. It’s a way to compartmentalize and reuse code by
creating collections of attributes and behaviors called classes which can be based on previously created classes. But abusing this concept by creating
a deep inheritance tree can lead to very complex and unmaintainable source code. Most of the time too deep of an inheritance tree is due to bad object
oriented design which leads to a systematic use of 'inheritance' when 'composition' would be better suited.</p>
<p>This rule raises an issue when the inheritance tree, starting from <code>Object</code> has a greater depth than is allowed.</p>
<p>For the parameter of the rule, the following rules are applied:</p>
<ul>
  <li> <code>?</code> matches a single character </li>
  <li> <code>*</code> matches zero or more characters </li>
  <li> <code>**</code> matches zero or more packages </li>
</ul>
<p>Examples:</p>
<ul>
  <li> <code>java.fwk.AbstractFwkClass</code> will stop count when AbstractFwkClassclass is reached. </li>
  <li> <code>java.fwk.*</code> will stop count when any member of java.fwkPackage package is reached. </li>
  <li> <code>java.fwk.**</code> same as above, but including sub-packages. </li>
</ul>
<p>Exceptions:</p>
<p>The rule stops counting when it encounters a class from one of the following packages (or sub-packages):</p>
<ul>
  <li> <code>android.**</code> </li>
  <li> <code>com.intellij.**</code> </li>
  <li> <code>com.persistit.**</code> </li>
  <li> <code>javax.swing.**</code> </li>
  <li> <code>org.eclipse.**</code> </li>
  <li> <code>org.springframework.**</code> </li>
</ul>

